//
//  UILabel+Extensions.swift
//  SwiftDemo
//
//  Created by Chris on 2017/6/13.
//  Copyright © 2017年 chris. All rights reserved.
//

import UIKit

extension UILabel {
    
    /// 创建一个多行label
    ///
    /// - Parameters:
    ///   - text: 文字
    ///   - fontSize: 字体大小, 默认 13
    ///   - color: 颜色, 默认 black
    /// - Returns: label
    class func cj_label(_ text: String?, fontSize: CGFloat = 13.0, color: UIColor = UIColor.black) -> UILabel {
        
        let label = UILabel()
        
        label.text = text
        label.font = UIFont.systemFont(ofSize: fontSize)
        label.numberOfLines = 0
        label.textColor = color
        
        label.sizeToFit()
        
        return label
    }
}
